package com.zh.oauth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@ApiModel("角色实体类")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("elec_role")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ElecRole extends Model<ElecRole> {

  private static final long serialVersionUID = 3781208943674919775L;

  @ApiModelProperty(value = "主键", name = "id")
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;
  @ApiModelProperty(value = "角色名", name = "roleName")
  private String roleName;
  @ApiModelProperty(value = "角色描述", name = "roleMemo")
  private String roleMemo;
  @ApiModelProperty(value = "父级id编号", name = "pid")
  private Long pid;
  @ApiModelProperty(value = "角色列表", name = "roleList")
  @TableField(exist = false)
  private List<ElecRole> children;
  @ApiModelProperty(value = "角色类型", name = "typeId")
  @TableField(exist = false)
  private Integer typeId;
  @ApiModelProperty(value = "角色关联外键主键", name = "foreignId")
  @TableField(exist = false)
  private Long foreignId;
  @ApiModelProperty(value = "操作是否完成标志", name = "success")
  @TableField(exist = false)
  private Integer success;
  @ApiModelProperty(value = "角色类", name = "elecRole")
  @TableField(exist = false)
  ElecRole elecRole;

  public ElecRole() { }

  public ElecRole(ElecRole value) {
    this.elecRole = value;
  }



}
